<?php
@session_start();
$PurviewLevel=2;
$CheckChannelID=0;  
$PurviewLevel_Others="sys_config";

require("../../inc/common.inc.php");
require_once("../Admin_ChkPurview.php");

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<TITLE>铭讯EOS网站后台管理</TITLE>
<Meta name="Keywords" Content="济南网站建设 济南网站制作 山东网站建设 济南铭讯软件有限公司">
<Meta name="Description" Content="济南网站制作：铭讯软件专业服务优秀企业，致力于网站建、设网站推广、网络营销一体的全访位网络服务商">
<link href="../images/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<?php
		if ($actions=="setsave"){
			if (is_array($webdbs)){
				foreach ($webdbs as $key =>$value){
					if ($key!="vpp_jigoucode" and $key!="vpp_jigoutel" and $key!="vpp_jigoutel2" and $key!="vpp_code"){
						if ($key=="vpp_addresscon"){$value=dvhtmlencode($value);}
						$configinfo=$db->getinfo("select * from mx_config where c_key='$key' limit 1");
						if (!is_array($configinfo)){
							$files=array(
							    "c_key"    =>$key,
								"c_value"  =>$value
							);
							$db->exe_insert("mx_config",$files);
						}
						else{
							$files=array(
								"c_value"=>$value
							);
							$db->exe_update("mx_config",$files,"c_key='$key'");
						}
					}
				}
			}
			jump2("操作成功","sys_config.php",2);
			exit();
		}else{
			$webdb[web_adisok]?$web_adopen1='checked':$web_adopen0='checked';
		}

require("../mx_head.php");?>
<div class="right">
		<div class="xm2">
			<h1 class="fl">系统设置</h1>
			<div class="clear"></div>
		</div>
		<div class="xm2_b">
			<div class="height15"></div>
				<form name="form1" id="form1" action="sys_config.php" method="post" onSubmit="return check_form();">
				  <table width="100%" border="0" align="center" cellpadding="9" cellspacing="0">
                    <tr>
                      <td width="15%" align="right" class="font14">微平台形象图：</td>
                      <td colspan="2"><table cellpadding="0" cellspacing="0" border="0"><tr><td><input type='text' name='webdbs[weixinlogo]' id='weixinlogo' size='60' value='<?php echo $webdb[weixinlogo]?>'></td><td>&nbsp;<a href="javascript:show_uplode('upfile','ad','weixinlogo')"><font color="#FF0000">点击上传图片</font></a></td></tr><tr><td colspan="2" style="color:#FF0000;">此图为微信公众平台回复的VPP形象图</td></tr></table>
					  </td>
                    </tr>
                    <?php if (trim($webdb[weixinlogo])!=""){?>
                    <tr>
                      <td align="right" class="font14">形象图：</td>
                      <td colspan="2"><img src="<?php echo get_photourl($webdb[weixinlogo]);?>" style="max-width:400px;; max-height:100px;" />
					  </td>
                    </tr>
                    <?php }?>
                    <tr>
                      <td align="right" class="font14">企业简介：</td>
                      <td colspan="2"><textarea name="webdbs[description]" id="description" cols="60" rows="5"><?php echo dvhtmlcode($webdb["description"]);?></textarea></td>
                    </tr>
                    <tr>
                      <td align="right" class="font14">公众账号类型：</td>
                      <td colspan="2"><input type="radio" name="webdbs[weixin_vpptype]" value="0" <?php if ($webdb["weixin_vpptype"]==0){echo "checked";}?> style="border:0px;">
        订阅号 
        <input type="radio" name="webdbs[weixin_vpptype]" value="1" <?php if ($webdb["weixin_vpptype"]==1){echo "checked";}?> style="border:0px;">
        服务号
					  </td>
                    </tr>
                    <tr>
                      <td align="right" class="font14">认证状态：</td>
                      <td colspan="2"><input type="radio" name="webdbs[weixin_vpprenzheng]" value="0" <?php if ($webdb["weixin_vpprenzheng"]==0){echo "checked";}?> style="border:0px;">
        未认证 
        <input type="radio" name="webdbs[weixin_vpprenzheng]" value="1" <?php if ($webdb["weixin_vpprenzheng"]==1){echo "checked";}?> style="border:0px;">
        已认证
					  </td>
                    </tr>
                    <tr>
                      <td align="right" class="font14">广告状态：</td>
                      <td colspan="2"><input type="radio" name="webdbs[web_adisok]" value="1" <?php echo $web_adopen1?> style="border:0px;">
        开启 
        <input type="radio" name="webdbs[web_adisok]" value="0" <?php echo $web_adopen0?> style="border:0px;">
        关闭
					  </td>
                    </tr>
                    <tr>
                      <td align="right" class="font14">广告图片：</td>
                      <td colspan="2"><table cellpadding="0" cellspacing="0" border="0" >
	  <tr><td><input type='text' name='webdbs[web_adpic]' id="web_adpic" size='60' value='<?php echo $webdb[web_adpic]?>'></td><td>&nbsp;<a href="javascript:show_uplode('upfile','ad','web_adpic')"><font color="#FF0000">点击上传图片</font></a></td></tr></table>
					  </td>
                    </tr>
                    <tr>
                      <td align="right" class="font14">广告网址：</td>
                      <td colspan="2"><input    type='text' name='webdbs[web_adurl]' size='66' value='<?php echo $webdb[web_adurl]?>'></td>
                    </tr>
                    <tr>
                      <td align="right" class="font14">联系电话：</td>
                      <td colspan="2"><table cellpadding="0" cellspacing="0" border="0"><tr><td><input type="text" name="webdbs[vpp_jigoutel]" id="webdbs[vpp_jigoutel]" value="<?php echo $webdb["vpp_jigoutel"]?>"/></td><td class="font12"></td></tr></table>
					  </td>
                    </tr>
                    <tr>
                      <td align="right" class="font14">400电话：</td>
                      <td colspan="2"><table cellpadding="0" cellspacing="0" border="0"><tr><td><input type="text" value="<?php echo $webdb["vpp_jigoutel2"]?>" disabled="disabled"/></td><td class="font12">&nbsp;&nbsp;<a href="#">点击快速申请</a></td></tr></table>
					  </td>
                    </tr>                
                    
                    <tr>
                      <td align="right" class="font14">地址：</td>
                      <td colspan="2"><input type="text" name="webdbs[vpp_address]" id="vpp_address" value="<?php echo $webdb["vpp_address"]?>" size="66"/></td>
                    </tr>
                    <script language="javascript">
					function showmap(phpfile,showtitle){
						J.dialog.get({ id: 'test2', title:''+showtitle+'',width: 800,height: 450, page: '/mxsoft/sys/'+phpfile+'.php', cover: true });
					}
					function changexy(lng,lat){
						document.getElementById("vpp_x").value=lng;
						document.getElementById("vpp_y").value=lat;
					}
					</script>
                    <tr>
                      <td align="right" class="font14">地址坐标：</td>
                      <td colspan="2" class="font12">
					  <table cellpadding="0" cellspacing="0" border="0"><tr><td>经度：</td><td><input type="text" name="webdbs[vpp_x]" id="vpp_x" value="<?php echo $webdb["vpp_x"]?>" size="15" onpropertychange="replaceNotNumber(this)" oninput="replaceNotNumber(this)" /></td><td>&nbsp;纬度：</td><td><input type="text"  name="webdbs[vpp_y]" id="vpp_y" value="<?php echo $webdb["vpp_y"]?>" size="15" onpropertychange="replaceNotNumber(this)" oninput="replaceNotNumber(this)" /></td><td>&nbsp;&nbsp;<input type="button" class="button2" name="button2" id="button2" value="点击获取" onclick="javascript:showmap('showmap','百度地图')" /></td></tr></table></td>
                    </tr>
                    <tr>
                      <td align="right" class="font14">公交路线：</td>
                      <td colspan="2"><textarea name="webdbs[vpp_addresscon]" id="vpp_addresscon" cols="60" rows="5"><?php echo dvhtmlcode($webdb["vpp_addresscon"]);?></textarea></td>
                    </tr>
    <!--<tr class="list"> 
      <td align="right" class="font14">版权信息:</td>
      <td colspan="2">
	  <script charset="utf-8" src="/webedito/kindeditor-min.js"></script>
	  <script charset="utf-8" src="/webedito/lang/zh_CN.js"></script>
	  <script>
	  var editor;
	  KindEditor.ready(function(K) {
	  	  editor = K.create('textarea[id="copyright"]', {
	  	  	  allowFileManager : true,
			  filterMode : false,
			  afterBlur : function() {this.sync();}
	  	  });
	  });
	  </script>
	  <textarea name="webdbs[copyright]" id="copyright" style="width:100%;height:400px;visibility:hidden;display:none;"><?php
$value=htmlspecialchars(stripslashes($webdb_vpp[copyright]));
echo $value?></textarea>
      </td>
    </tr>-->
					<tr><td height="40" align="center" colspan="3">
					<input type="submit" name="sub" value="提交" class="button" />&nbsp;&nbsp;<input type="reset" name="r" value="重置" class="button2" /><input type="hidden" name="actions" value="setsave" />
					</td></tr>
				</table>
          </form>
			<div class="height15"></div>
		</div>
		<div class="clear"></div>
</div>
<?php require("../mx_foot.php");?>
<div class="clear"></div>
<div class="height10"></div>
</body>
</html>